# output generic information about the core and buildtype chosen
message("")
message("* TrinityCore revision   : ${rev_hash} ${rev_date} (${rev_branch} branch)")
if( UNIX )
  message("* TrinityCore buildtype  : ${CMAKE_BUILD_TYPE}")
endif()
message("")

# output information about installation-directories and locations

message("* Install core to        : ${CMAKE_INSTALL_PREFIX}")
if( UNIX )
  message("* Install libraries to   : ${LIBSDIR}")
  message("* Install configs to     : ${CONF_DIR}")
endif()
message("")

# Show infomation about the options selected during configuration

if (BUILD_LOGON)
  message("* Build logonserver : Yes (default)")
else()
  message("* Build logonserver : No")
endif()

if (BUILD_WORLD)
  message("* Build worldserver : Yes (default)")
else()
  message("* Build worldserver : No")
endif()

if (BUILD_TOOLS)
  message("* Build tools       : Yes")
  add_definitions(-DNO_CORE_FUNCS)
else()
  message("* Build tools       : No (default)")
endif()

if (BUILD_TESTS)
  message("* Build unit-tests  : Yes")
else()
  message("* Build unit-tests  : No (default)")
endif()
message("")

if (BUILD_SCRIPTS AND (NOT BUILD_SCRIPTS STREQUAL "none"))
  message("* Build with scripts     : Yes (${BUILD_SCRIPTS})")
  add_definitions(-DSCRIPTS)
  if (BUILD_SCRIPTS STREQUAL "rg")
	  add_definitions(-DRG_SCRIPTS)
  endif()
else()
  message("* Build with scripts     : No")
endif()

if (BUILD_SCRIPTS_NEW AND (NOT BUILD_SCRIPTS_NEW STREQUAL "none"))
  message("* Build with new scripts : Yes (${BUILD_SCRIPTS_NEW})")
  if (BUILD_SCRIPTS_NEW STREQUAL "reloadable")
	set(ENABLE_SCRIPT_RELOAD ON)
	add_definitions(-DENABLE_SCRIPT_RELOAD)
  endif()
elseif()
  message("* Build with new scripts : No")
endif ()
message("")

if( USE_COREPCH )
  message("* Build core w/PCH       : Yes (default)")
else()
  message("* Build core w/PCH       : No")
endif()

if( USE_SCRIPTPCH )
  message("* Build scripts w/PCH    : Yes (default)")
else()
  message("* Build scripts w/PCH    : No")
endif()

if( USE_TESTPCH )
  message("* Build tests w/PCH      : Yes (default)")
else()
  message("* Build tests w/PCH      : No")
endif()

if( WITH_WARNINGS )
  message("* Show all warnings      : Yes")
else()
  message("* Show compile-warnings  : No  (default)")
endif()

if( WITH_COREDEBUG )
  message("")
  message(" *** WITH_COREDEBUG - WARNING!")
  message(" *** additional core debug logs have been enabled!")
  message(" *** this setting doesn't help to get better crash logs!")
  message(" *** in case you are searching for better crash logs use")
  message(" *** -DCMAKE_BUILD_TYPE=RelWithDebug")
  message(" *** DO NOT ENABLE IT UNLESS YOU KNOW WHAT YOU'RE DOING!")
  message("* Use coreside debug     : Yes")
  add_definitions(-DTRINITY_DEBUG)
else()
  message("* Use coreside debug     : No  (default)")
endif()

if( NOT WITH_SOURCE_TREE STREQUAL "no" )
  message("* Show source tree       : Yes - \"${WITH_SOURCE_TREE}\"")
else()
  message("* Show source tree       : No")
endif()

if (USE_STATIC_DEPENDENCIES AND NOT WIN32)
  message("* Static dependencies    : Yes")
  set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" "${CMAKE_FIND_LIBRARY_SUFFIXES}")
  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
else()
  message("* Static dependencies    : No (default)")
endif()

if (WITH_PROMETHEUS_MONITORING)
  message("* Prometheus monitoring  : Yes")
else()
  message("* Prometheus monitoring  : No (default)")
endif()

if ( WITH_SOCKET_ACTIVATION )
  message("* Socket Activation :      Yes")
else()
  message("* Socket Activation :      No (default)")
endif()

if (WITH_GRAYLOG_SUPPORT)
  message("* Graylog support        : Yes")
else()
  message("* Graylog support        : No (default)")
endif()

if (THREADSAFETY_DEBUG_ENABLE)
  if (THREADSAFETY_DEBUG_ASSERT)
    message("* Threadsafety Debugging : Assert")
    add_definitions(-DTHREADSAFETY_DEBUG_ASSERT)
  else()
    message("* Threadsafety Debugging : Warn (default)")
  endif()
  add_definitions(-DTHREADSAFETY_DEBUG_ENABLE)
else()
  message("* Threadsafety Debugging : No")
endif()

if ( CPR_AND_CURL )
  message("* Build with cpr + curl  : Yes")
else()
  message("* Build with cpr + curl  : No (default)")
endif()
if (SANITIZE_ASSERT)
  message("* Sanizize Assert        : On")
  add_definitions(-DSANITIZE_ASSERT)
else()
  message("* Sanizize Assert        : Off (default)")
endif()
if (WITH_RESTRICTED_LOGON_ACCESS)
  message("* Restricted logon access: On")
  add_definitions(-DRG_RESTRICTED_LOGON_ACCESS)
else()
  message("* Restricted Logon Access: Off (default)")
endif()


if ( WITHOUT_GIT )
  message("* Use GIT revision hash  : No")
  message("")
  message(" *** WITHOUT_GIT - WARNING!")
  message(" *** By choosing the WITHOUT_GIT option you have waived all rights for support,")
  message(" *** and accept that or all requests for support or assistance sent to the core")
  message(" *** developers will be rejected. This due to that we will be unable to detect")
  message(" *** what revision of the codebase you are using in a proper way.")
  message(" *** We remind you that you need to use the repository codebase and a supported")
  message(" *** version of git for the revision-hash to work, and be allowede to ask for")
  message(" *** support if needed.")
else()
  message("* Use GIT revision hash  : Yes")
endif()

if ( NOJEM )
  message("")
  message(" *** NOJEM - WARNING!")
  message(" *** jemalloc linking has been disabled!")
  message(" *** Please note that this is for DEBUGGING WITH VALGRIND only!")
  message(" *** DO NOT DISABLE IT UNLESS YOU KNOW WHAT YOU'RE DOING!")
elseif ( VALGRIND )
  message("")
  message(" *** VALGRIND - WARNING!")
  message(" *** jemalloc will be configured to support Valgrind")
  message(" *** Please specify the valgrind include directory in VALGRIND_INCLUDE_DIR option if you get build errors")
  message(" *** Please note that this is for DEBUGGING WITH VALGRIND only!")
  add_definitions(-DJEMALLOC_VALGRIND)
endif()

if ( HELGRIND )
  message("")
  message(" *** HELGRIND - WARNING!")
  message(" *** Please specify the valgrind include directory in VALGRIND_INCLUDE_DIR option if you get build errors")
  message(" *** Please note that this is for DEBUGGING WITH HELGRIND only!")
  add_definitions(-DHELGRIND)
endif()

message("")

